package com.sias.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

/**
 * @author 吴文杰
 * @version 1.0
 * @since 2023/5/31 11:36
 */
@Configuration
@ComponentScan("com.sias.controller")
@EnableWebMvc
public class WebMVCConfig {
  @Bean
  public ViewResolver viewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setPrefix("/static/");
    resolver.setSuffix(".jsp");
    return resolver;
  }
}